/*
 * @Author: wanchunyi 1536793586@qq.com
 * @Date: 2022-11-19 15:07:46
 * @LastEditors: wanchunyi 1536793586@qq.com
 * @LastEditTime: 2023-02-22 15:46:09
 * @FilePath: \virtualHome\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '@/views/pptlist/PPTTUBView.vue'

Vue.use(VueRouter)
const routes = [
  {
    path: '/',
    name: 'home',
    component: () => import(/* webpackChunkName: "about" */ '@/views/home/HomeView.vue')
  },
  {
    path: '/video',
    name: 'video',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: HomeView
  },
  {
    path: "/virtual",
    name: "virtual",
    component: () => import(/* webpackChunkName: "about" */"@/views/virtual/virtual.vue")
  },
  {
    path: "/prowav",
    name: "prowav",
    component: () => import(/* webpackChunkName: "about" */"@/views/projectwavendmp3")
  },
  {
    path: "/protext",
    name: "protext",
    component: () => import(/* webpackChunkName: "about" */"@/views/prijecttext")
  },
  {
    path: '/login',
    name: 'login',
    component: () => import(/* webpackChunkName: "about" */"@/views/login.vue")
  },
  {
    path: "/demo",
    name: "demo",
    component: () => import(/* webpackChunkName: "about" */"@/views/projectdemo/demo.vue")
  }
]


const RouterConfig = {
  mode: 'hash',
  base: '/home/',
  routes: routes
};
// const router = new VueRouter({
//   routes
// })
export const router = new VueRouter(RouterConfig);
export const asyncRoutes = [
  // 404 page must be placed at the end !!!
  { path: '*', redirect: '/404', hidden: true }
]
resetRouter = function () { //这里不懂不加就报错，不研究了，估计是清空路由
  return []
}

// const router = router()
export function resetRouter() {
  const newRouter = createRouter()
  router.matcher = newRouter.matcher
}
export const constantRoutes = []
export default router
